package cn.net.xyan.easy.spring.model;


import org.springframework.http.MediaType;

import java.util.LinkedList;
import java.util.List;

/**
 * Created by zarra on 16/3/7.
 */
public class RestServiceMethod {
    String methodName;
    String path;
    String returnTypeName;
    String requestTypeName;
    String acceptContentType = MediaType.APPLICATION_JSON_VALUE;
    String produceContentType = MediaType.APPLICATION_JSON_VALUE;
    String httpMethod = "POST";
    boolean hasPageable;

    List<PathParam> pathParams = new LinkedList<>();

    List<HeadParam> headParams = new LinkedList<>();

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getReturnTypeName() {
        return returnTypeName;
    }

    public void setReturnTypeName(String returnTypeName) {
        this.returnTypeName = returnTypeName;
    }

    public String getRequestTypeName() {
        return requestTypeName;
    }

    public void setRequestTypeName(String requestTypeName) {
        this.requestTypeName = requestTypeName;
    }

    public String getAcceptContentType() {
        return acceptContentType;
    }

    public void setAcceptContentType(String acceptContentType) {
        this.acceptContentType = acceptContentType;
    }

    public String getProduceContentType() {
        return produceContentType;
    }

    public void setProduceContentType(String produceContentType) {
        this.produceContentType = produceContentType;
    }

    public String getHttpMethod() {
        return httpMethod.toUpperCase();
    }

    public void setHttpMethod(String httpMethod) {
        this.httpMethod = httpMethod.toUpperCase();
    }

    public List<PathParam> getPathParams() {
        return pathParams;
    }

    public void setPathParams(List<PathParam> pathParams) {
        this.pathParams = pathParams;
    }

    public List<HeadParam> getHeadParams() {
        return headParams;
    }

    public void setHeadParams(List<HeadParam> headParams) {
        this.headParams = headParams;
    }

    public boolean isHasPageable() {
        return hasPageable;
    }

    public void setHasPageable(boolean hasPageable) {
        this.hasPageable = hasPageable;
    }
}
